package com.woniuxy.qos;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.woniuxy.utils.Utils;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public class QosProducer {
    public static void main(String[] args) throws IOException, TimeoutException {
        Connection connection = Utils.getConnection();
        Channel channel = connection.createChannel();
        for (int i = 0; i <100 ; i++) {
            channel.basicPublish("QosExchange","qos1",null,"QosProducer 发送信息".getBytes());
        }
        channel.close();
        connection.close();
    }
}
